<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"  xml:lang="zh-CN" lang="zh-CN">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>我的网址收藏夹</title>
<link rel="stylesheet" href="{&$skin}/html.css" type="text/css" />
<link rel="stylesheet" href="{&$skin}/main.css" type="text/css" />
<link rel="stylesheet" href="{&$skin}/sform.css" type="text/css" />
<script type="text/javascript" src="{&$js}/jquery.min.js"></script>
<style type="text/css">
.sform .inline label{width:16%;}
.sform select{width:36%;height:20px;}
.sform .textput{width:76%;height:20px;}
.sform textarea{width:76%;height:50px;}
.sform .areaput{font-size:12px;color:#444}
</style>
<script type="text/javascript">
var addcata_ctrl = '{&$root}/my/addcata';
var addurl_ctrl = '{&$root}/my/addurl';
var editurl_ctrl = '{&$root}/my/editurl';
var saveintro_ctrl = '{&$root}/my/saveintro';
var delcata_ctrl = '{@./delcata}';
var editcata_ctrl = '{@./editcata}';
</script>
<script type="text/javascript" src="{&$js}/my.js"></script>
</head>
<body>
<!--头部_start-->
{include file='blocks/header.tpl'}
<!--头部结束_end-->


<!--Wrap__Start-->
<div id="wrap">
<div id="ccwrap">
    <div class="mside">
        <table class="umenu" id="cata_list" border="0" cellpadding="0" cellspacing="0">
        <tr>
            <td class="cn"><a href="{@./}">默认收藏夹</a><span class="num" id="default_cnt"></span></td>
        </tr>
<?php
$default_cnt = $this->ufav_cnt;
foreach ($this->uclist as $uc) {
$default_cnt -= (int)$uc['url_cnt'];
echo <<<EOT
    <tr>
        <td class="cn"><a href="{@./?cid={$uc['id']}}">{$uc['name']}</a><span class="num">({$uc['url_cnt']})</span></td>
        <td class="co"><a href="javascript:;" onclick="cata_edit(this, {$uc['id']}, '{$uc['name']}')" class="i-edit" title="修改名称"><img src='{&$skin}/images/icon_edit.png' alt="修改" /></a>&nbsp;&nbsp;<a href="javascript:;" onclick="cata_del(this, {$uc['id']}, {$uc['url_cnt']})" class="i-del" title="删除目录"><img src='{&$skin}/images/icon_del.png' alt="删除" /></a></td>
    </tr>
EOT;
}
?>
        </table>
<?php
echo '<script type="text/javascript">$("#default_cnt").html("('. $default_cnt .')")</script>';
?>
    </div>
    <div class="mlist">
		<div class="litab">
            <ul>
            <li class="cur">{#$cname}</li>
            <!--
                <li class="cur"><a href="">人气推荐</a></li>
                <li><a href="">最多收藏</a></li>
                <li><a href="">最多访问</a></li>
                <li><a href="">最新分享</a></li>
                -->
            </ul>
<!--
            <div class="show">
                <img src="{&$skin}/images/icon_list.png" align="absmiddle" /> <a href="">只显示网址</a>
            </div>
-->
            <div class="clear"></div>
		</div>
        <table class="licc" id="ulist" width="100%" border="0" cellpadding="0" cellspacing="0">
<?php
if ($this->urls) {
foreach ($this->urls as $url) {
echo <<<EOT
        <tr>
            <td valign="center" class="c-info" id="u_{$url['id']}">
                <img src="{&$skin}/images/icon_web.png" />&nbsp;
                <a href="{$url['url']}" target="_blank">{$url['title']}</a>
                <p>{$url['intro']}</p>
            </td>
            <td valign="center" class="c-po">
                <span class="tm">{$url['create_tm']}</span>
                <span class="opt"><a href="javascript:;" onclick="edit_url({$url['id']})"><img src='{&$skin}/images/icon_edit.png' alt="修改" /></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="{&$root}/my/delurl?id={$url['id']}" onclick="return confirm('确定要删除这条网址吗？');"><img src='{&$skin}/images/icon_del.png' alt="删除" /></a></span>
            </td>
        </tr>
EOT;
}
} else {
echo <<<EOT
        <tr>
            <td colspan="3">此目录还没有收藏，<input type="button" value="添加收藏" class="bnt-mid" onclick="$('#addbtn').click();"></td>
        </tr>
EOT;
}

if ($this->pages) {
    echo '<tr><td colspan="3">', $this->pages ,'</td></tr>';
}
?>

<!--
        <tr>
            <td valign="top" class="c-ico"><img src="{&$skin}/images/icon_web.png" /></td>
            <td valign="top" class="c-info">
                <a href="">百度一下你就知道</a>
                <p>中国最大的搜索引擎！</p>
            </td>
            <td valign="top" class="c-po">
                <div class="po-fav"></div>
                <div class="po-inte"></div>
            </td>
        </tr>
-->
        </table>
    </div>
    <div class="clear"></div>
</div>
</div>
<!--Wrap__End-->


<!--页脚_start-->
{include file='blocks/footer.tpl'}
<!--页脚_end-->


<!--遮蔽窗口__Start-->
<div class="maskbg" id="maskbg" style="display:none;"></div>
<div class="fwin" id="fwin" style="display:none;">
<div class="adapter">
	<div class="close"><a href="javascript:;" id="closebtn"><span>关闭</span></a></div>
    {include file="blocks/form_url.tpl"}
</div>
</div>
<!--遮蔽窗口__End-->
</body>
</html>